home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / compress / gnucpio.zip / PATCHES.OS2 < prev    next >
Text File  |  1996-01-01  |  8KB  |  251 lines

  1. diff -cb orig/copyin.c new/copyin.c
  2. *** orig/copyin.c    Wed Nov 30 23:49:06 1994
  3. --- new/copyin.c    Mon Jan 01 10:05:36 1996
  4. ***************
  5. *** 1055,1063 ****
  6.   
  7.     printf ("%s %3u ", mbuf, file_hdr->c_nlink);
  8.   
  9. - #ifndef __MSDOS__
  10.     if (numeric_uid)
  11. - #endif
  12.       printf ("%-8u %-8u ", (unsigned int) file_hdr->c_uid,
  13.           (unsigned int) file_hdr->c_gid);
  14.   #ifndef __MSDOS__
  15. --- 1055,1061 ----
  16. diff -cb orig/copyout.c new/copyout.c
  17. *** orig/copyout.c    Wed Nov 30 23:47:40 1994
  18. --- new/copyout.c    Mon Jan 01 10:05:38 1996
  19. ***************
  20. *** 108,115 ****
  21. --- 108,117 ----
  22.         int dev = 0, rdev = 0;
  23.   #endif
  24.   
  25. + #ifndef __EMX__
  26.         if ((file_hdr->c_ino >> 16) != 0)
  27.       error (0, 0, "%s: truncating inode number", file_hdr->c_name);
  28. + #endif
  29.   
  30.         sprintf (ascii_header,
  31.              "%06o%06o%06lo%06lo%06lo%06lo%06lo%06o%011lo%06lo%011lo",
  32. ***************
  33. *** 135,142 ****
  34. --- 137,146 ----
  35.         short_hdr.c_magic = 070707;
  36.         short_hdr.c_dev = makedev (file_hdr->c_dev_maj, file_hdr->c_dev_min);
  37.   
  38. + #ifndef __EMX__
  39.         if ((file_hdr->c_ino >> 16) != 0)
  40.       error (0, 0, "%s: truncating inode number", file_hdr->c_name);
  41. + #endif
  42.   
  43.         short_hdr.c_ino = file_hdr->c_ino & 0xFFFF;
  44.         short_hdr.c_mode = file_hdr->c_mode & 0xFFFF;
  45. ***************
  46. *** 153,159 ****
  47. --- 157,165 ----
  48.            archives, but for devices it sets major = 0, minor = 1, and 
  49.            puts the actual major/minor number in the filesize field.  */
  50.             case CP_IFCHR:
  51. + #ifdef CP_IFBLK
  52.             case CP_IFBLK:
  53. + #endif
  54.   #ifdef CP_IFSOCK
  55.             case CP_IFSOCK:
  56.   #endif
  57. diff -cb orig/main.c new/main.c
  58. *** orig/main.c    Thu Dec 01 01:24:20 1994
  59. --- new/main.c    Mon Jan 01 10:05:44 1996
  60. ***************
  61. *** 81,86 ****
  62. --- 81,90 ----
  63.     FILE *fp;
  64.     int status;
  65.   {
  66. + #ifdef __MSDOS__
  67. +   extern char *version_string;
  68. +   fprintf(stderr, "\nGNU cpio %s\n", version_string);
  69. + #endif
  70.     fprintf (fp, "\
  71.   Usage: %s {-o|--create} [-0acvABLV] [-C bytes] [-H format] [-M message]\n\
  72.          [-O [[user@]host:]archive] [-F [[user@]host:]archive]\n\
  73. ***************
  74. *** 88,94 ****
  75.          [--null] [--reset-access-time] [--verbose] [--dot] [--append]\n\
  76.          [--block-size=blocks] [--dereference] [--io-size=bytes] [--quiet]\n\
  77.          [--force-local] [--help] [--version] < name-list [> archive]\n", program_name);
  78. !   fprintf (fp, "\
  79.          %s {-i|--extract} [-bcdfmnrtsuvBSV] [-C bytes] [-E file] [-H format]\n\
  80.          [-M message] [-R [user][:.][group]] [-I [[user@]host:]archive]\n\
  81.          [-F [[user@]host:]archive] [--file=[[user@]host:]archive]\n\
  82. --- 92,98 ----
  83.          [--null] [--reset-access-time] [--verbose] [--dot] [--append]\n\
  84.          [--block-size=blocks] [--dereference] [--io-size=bytes] [--quiet]\n\
  85.          [--force-local] [--help] [--version] < name-list [> archive]\n", program_name);
  86. !   fprintf (fp, "\n\
  87.          %s {-i|--extract} [-bcdfmnrtsuvBSV] [-C bytes] [-E file] [-H format]\n\
  88.          [-M message] [-R [user][:.][group]] [-I [[user@]host:]archive]\n\
  89.          [-F [[user@]host:]archive] [--file=[[user@]host:]archive]\n\
  90. ***************
  91. *** 100,106 ****
  92.          [--force-local] [--no-absolute-filenames] [--sparse] [--only-verify-crc]\n\
  93.          [--quiet] [--help] [--version] [pattern...] [< archive]\n",
  94.          program_name);
  95. !   fprintf (fp, "\
  96.          %s {-p|--pass-through} [-0adlmuvLV] [-R [user][:.][group]]\n\
  97.          [--null] [--reset-access-time] [--make-directories] [--link] [--quiet]\n\
  98.          [--preserve-modification-time] [--unconditional] [--verbose] [--dot]\n\
  99. --- 104,110 ----
  100.          [--force-local] [--no-absolute-filenames] [--sparse] [--only-verify-crc]\n\
  101.          [--quiet] [--help] [--version] [pattern...] [< archive]\n",
  102.          program_name);
  103. !   fprintf (fp, "\n\
  104.          %s {-p|--pass-through} [-0adlmuvLV] [-R [user][:.][group]]\n\
  105.          [--null] [--reset-access-time] [--make-directories] [--link] [--quiet]\n\
  106.          [--preserve-modification-time] [--unconditional] [--verbose] [--dot]\n\
  107. diff -cb orig/makefile.os2 new/makefile.os2
  108. *** orig/makefile.os2    Sat Aug 22 20:00:32 1992
  109. --- new/makefile.os2    Mon Jan 01 10:18:50 1996
  110. ***************
  111. *** 15,50 ****
  112.   # along with this program; if not, write to the Free Software
  113.   # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  114.   
  115. - # no more optimizations for MS C 6.00 than -Olt
  116. - # otherwise it produces bad code!
  117.   DEFS = -D__MSDOS__ -DSTDC_HEADERS -DHAVE_VPRINTF -DHAVE_STRERROR -DNO_REMOTE
  118.   
  119. ! # use this for MS C 6.00 (16-bit)
  120. ! #CC = cl -nologo -AS -Ot
  121. ! #CFLAGS = -Za -I. $(DEFS)
  122. ! #LDFLAGS = -Lp -Fb -F 4000 -link /noe
  123. ! #LIBS = d:\ms\lib\setargv.obj
  124. ! #DEF = cpio.def
  125. ! #O = .obj
  126.   
  127. - # and this for emx/gcc (32-bit)
  128. - CC = gcc -O
  129.   CFLAGS = -ansi -I. $(DEFS)
  130. - LDFLAGS = -s
  131.   LIBS = 
  132. - DEF =
  133. - O = .o
  134.   
  135.   OBJS = copyin$(O) copyout$(O) copypass$(O) dstring$(O) fnmatch$(O) \
  136.   global$(O) main$(O) tar$(O) util$(O) error$(O) getopt$(O) getopt1$(O) \
  137.   filemode$(O) version$(O) xmalloc$(O) xstrdup$(O) makepath$(O) bcopy$(O) \
  138. ! dirname$(O) stripslash$(O) # tcexparg$(O)
  139.   
  140.   all:    cpio.exe
  141.   
  142. ! cpio.exe:    $(OBJS) $(DEF)
  143. !     $(CC) -o $@ $(DEF) $(OBJS) $(LIBS) $(LDFLAGS)
  144.   
  145.   .c$(O):
  146.       $(CC) -c $(CFLAGS) $<
  147. --- 15,44 ----
  148.   # along with this program; if not, write to the Free Software
  149.   # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  150.   
  151.   DEFS = -D__MSDOS__ -DSTDC_HEADERS -DHAVE_VPRINTF -DHAVE_STRERROR -DNO_REMOTE
  152.   
  153. ! # this is for emx/gcc (32-bit)
  154. ! release:
  155. !     $(MAKE) all -f makefile.os2 \
  156. !     CC="gcc -Zomf -O" O=".obj" LDFLAGS="-s -Zcrtdll -Zstack 512"
  157. ! debug:
  158. !     $(MAKE) all -f makefile.os2 \
  159. !     CC="gcc -g" O=".o" LDFLAGS=""
  160.   
  161.   CFLAGS = -ansi -I. $(DEFS)
  162.   LIBS =
  163.   
  164.   OBJS = copyin$(O) copyout$(O) copypass$(O) dstring$(O) fnmatch$(O) \
  165.   global$(O) main$(O) tar$(O) util$(O) error$(O) getopt$(O) getopt1$(O) \
  166.   filemode$(O) version$(O) xmalloc$(O) xstrdup$(O) makepath$(O) bcopy$(O) \
  167. ! dirname$(O) stripslash$(O) defer$(O) # tcexparg$(O)
  168.   
  169.   all:    cpio.exe
  170.   
  171. ! cpio.exe:    $(OBJS)
  172. !     $(CC) -o $@ $(OBJS) $(LIBS) $(LDFLAGS)
  173. ! .SUFFIXES: .c $O
  174.   
  175.   .c$(O):
  176.       $(CC) -c $(CFLAGS) $<
  177. diff -cb orig/makepath.c new/makepath.c
  178. *** orig/makepath.c    Wed Nov 30 23:50:10 1994
  179. --- new/makepath.c    Mon Jan 01 10:08:22 1996
  180. ***************
  181. *** 62,71 ****
  182.   #include <strings.h>
  183.   #endif
  184.   
  185. ! #if defined(__MSDOS__) && !defined(__GNUC__)
  186. ! typedef int uid_t;
  187. ! typedef int gid_t;
  188. ! #endif
  189.   
  190.   void error ();
  191.   
  192. --- 62,68 ----
  193.   #include <strings.h>
  194.   #endif
  195.   
  196. ! #include "system.h" /* for PC's, uid_t, gid_t, mkdir() */
  197.   
  198.   void error ();
  199.   
  200. diff -cb orig/system.h new/system.h
  201. *** orig/system.h    Wed Nov 30 23:50:00 1994
  202. --- new/system.h    Mon Jan 01 10:12:34 1996
  203. ***************
  204. *** 91,100 ****
  205.   #ifndef errno
  206.   extern int errno;
  207.   #endif
  208. - #ifdef __EMX__            /* gcc on OS/2.  */
  209. - #define EPERM EACCES
  210. - #define ENXIO EIO
  211. - #endif
  212.   
  213.   #ifdef HAVE_UTIME_H
  214.   #include <utime.h>
  215. --- 91,96 ----
  216. ***************
  217. *** 124,129 ****
  218. --- 120,129 ----
  219.   #if defined(__MSDOS__) && !defined(__GNUC__)
  220.   typedef int uid_t;
  221.   typedef int gid_t;
  222. + #endif
  223. + #if defined(__MSDOS__) && !defined(__EMX__)
  224. + #define mkdir(p, m) mkdir(p)
  225.   #endif
  226.   
  227.   /* On most systems symlink() always creates links with rwxrwxrwx
  228. diff -cb orig/util.c new/util.c
  229. *** orig/util.c    Wed Nov 30 23:47:52 1994
  230. --- new/util.c    Mon Jan 01 10:14:30 1996
  231. ***************
  232. *** 1000,1006 ****
  233.   }
  234.   #endif /* SYMLINK_USES_UMASK */
  235.   
  236. ! #if defined(__MSDOS__) && !defined(__GNUC__)
  237.   int
  238.   chown (path, owner, group)
  239.        char *path;
  240. --- 1000,1006 ----
  241.   }
  242.   #endif /* SYMLINK_USES_UMASK */
  243.   
  244. ! #if defined(__MSDOS__) && !defined(__GNUC__) || defined(__EMX__)
  245.   int
  246.   chown (path, owner, group)
  247.        char *path;
  248.